﻿// -----------------------------------------------------------------------
// <copyright file="SpriteFire.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace BloodThirsty
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class SpriteFire
    {
        private Texture2D[] _Texture;

        public Texture2D[] Texture
        {
            get { return _Texture; }
            set { _Texture = value;
            nTexture = _Texture.Length;
            iTexture = 0;
            
            
            }
        }
        private int _nTexture;

        public int nTexture
        {
            get { return _nTexture; }
            set { _nTexture = value; }
        }
        private int _iTexture = 0;

        public int iTexture
        {
            get { return _iTexture; }
            set { _iTexture = value; }
        }
        private double _Left;

        public double Left
        {
            get { return _Left; }
            set { _Left = value; }
        }
        private double _Top;

        public double Top
        {
            get { return _Top; }
            set { _Top = value; }
        }

        private bool _Click = false;

        public bool Click
        {
            get { return _Click; }
            set { _Click = value; }
        }

        // Ham Khoi Tao
        public SpriteFire(Texture2D[] texture, double left, double top)
        {
            
                Texture = texture;
                Left = left;
                Top = top;
            
        }

        //Ham update
        public void Update(GameTime gametime)
        {
            iTexture = (iTexture + 1) % nTexture;
           
            
        }

        // Ham Draw
        public void Draw(GameTime gametime, SpriteBatch spriteBatch)
        {
            
                spriteBatch.Draw(Texture[iTexture], new Vector2((float)Left,(float)Top), Color.White);
            
        }

    }
}
